package com.autonavi.yunda.yunji.core.vo.response;

import com.autonavi.yunda.yunji.core.enums.FunctionStatus;
import com.autonavi.yunda.yunji.core.enums.FunctionType;
import com.autonavi.yunda.yunji.core.model.dto.FunctionConfigDTO;
import lombok.Data;

/**
 * @author cizhong.wcs
 * @date 2023/8/1 16:56
 */
@Data
public class SimpleFunctionConfigVO {
    private Long id;
    private String name;
    private String params;
    private String description;
    private FunctionType type;
    private FunctionStatus status;
    private String version;

    public static SimpleFunctionConfigVO from(FunctionConfigDTO dto) {
        SimpleFunctionConfigVO vo = new SimpleFunctionConfigVO();
        vo.setId(dto.getId());
        vo.setName(dto.getName());
        vo.setParams(dto.getParams());
        vo.setDescription(dto.getDescription());
        vo.setType(dto.getType());
        vo.setStatus(dto.getStatus());
        vo.setVersion(dto.getVersion());
        return vo;
    }
}
